
from django.shortcuts import render
from django.http import HttpResponse,JsonResponse
from django.views.generic import View
# Create your views here.

from .models import meaus
from .serializer import MeausSerializer


class get_meaus(View):
    def get(self, request):
        meaus_data = meaus.objects.filter(pk=1)  # 获取数据库所有的信息

        meaus_dict = MeausSerializer(meaus_data, many=True).data

        return JsonResponse(meaus_dict, status=200, safe=False)

